package cn.cerc.sample.enums;

import java.util.Arrays;

import lombok.Getter;

public enum TBType {
    AB("进货单"),
    BC("出货单"),
    AE("盘点单");

    @Getter
    private final String desc;

    private TBType(String desc) {
        this.desc = desc;
    }

    public static boolean contains(String tb) {
        if (Arrays.stream(TBType.values()).noneMatch(item -> item.name().equals(tb)))
            throw new RuntimeException("非法单别！");
        return true;
    }

}